package com.mybatis;

import com.mybatis.core.DefaultSqlSession;
import com.mybatis.core.SqlSession;
import com.mybatis.domain.User;
import com.mybatis.mappers.UserMapper;

import java.util.List;

/**
 * @author ${USER}
 */
public class Main {
  public static void main(String[] args)
  {
    SqlSession sqlSession = new DefaultSqlSession();
    UserMapper mapper = sqlSession.getMapper(UserMapper.class);
    User user = mapper.selectById(100);
    System.out.println(user);

    List<User> users = mapper.selectUsers();
    System.out.println(users);
  }
}
